Hi Tom!
I have Kmotion 431C installed and I'm having odd problems with
Mach3 R3.042.040.
Today I got KFlop twice so corrupted that I had to start from beginning by Flashing new firmware. It appears that if Kflop is not powered up when Mach tries to init, something gets so messed up that have to terminate mach with task manager and reboot in order to try again.
Which KMotion/Plug in I should use with:
- Mach 042.040?
- Mach 043.022?
Which Mach3 version should be used with KFlop 431C?
As to the odd problems:
I have 2500ppr encoders with 1:3 reduction and 5mm/rev lead screws on XYZ. I calculate this to be 6000steps/mm on Mach motor tuning but 5920 to 5980steps/mm results in correctly measured move
A-axis/Spindle is angular and has 2560ppr/rev and 1:1 belt.
I calculate 2560*4/360=28,44444 but testing gives between 37 and 38 to be correct.
Any ideas what might be the cause and cure for this?
After getting the axis moving correctly I tried "SpindleMach3Jog.c".
What should be entered in the plugin config for encoder counts? Encoder ppr or ppr*4?
With 2560 counts/rev and following code:
#include "KMotionDef.h"
//Plugin Notifications and defines..
enum { EX_DDA , EX_VMS, EX_COMMAND, EX_SPINON, EX_SPINOFF, EX_SPINSPEED, EX_MOTORTUNED
, EX_SETUP, EX_FEEDHOLD, EX_RUN, EX_ESTOP , EX_CONFIG };
#define SPINDLE_AXIS 3 // axis set up as Spindle, possibly Step/Dir or Servo
#define FACTOR 10240.0 // Converts fractional pulley speed to counts/sec (may be negative)
main()
{
int message = persist.UserData[0]; // Mach3 message ID
int Direction = persist.UserData[1]; // Mach3 Spindle Direction
float speed = *(float *)&persist.UserData[2]; // value stored is actually a float
int DirFactor = 1;
if (Direction==0) DirFactor=-1; // change Direcion 0 or 1 to DirFactor -1 or +1
printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f\n",message,Direction,speed);
switch (message)
{
case EX_SPINSPEED:
printf("Spindle Speed Set to %f\n",speed);
Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor);
break;
:
:
I get movement that starts as soon as enter the rpm and press enter and continues until rpm is set to 0.
With requested 200rpm the true output is 100 rpm, but mach reports something around 1500 (can't remember exactly).
If I start the movement from G-Code/M3 the G-code execution hangs.
Start/accel and stop/decel of movement are nice, as they should.
I changed the above to:
:
:
case EX_SPINSPEED:
printf("Spindle Speed Set to %f\n",speed);
break;
case EX_SPINON:
Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor);
break;
:
:
with this I get
movement that starts when I press spindle start.
With requested 200rpm the true output is 100 rpm, but mach report something around 1500 (can't remember exactly).
If I start the movement from G-Code/M3 the G-code execution hangs.
Start/accel and stop/decel of movement are very rough, with short delay and vibration/jerk like the servo is about to brake into oscillation.
How could I get around this?
I also noticed that in plugin config there is a possibility to specify a external cycle start.
Can this be handled in the init thread in my WatchEnable loop?
If Yes then is there a way to do the Reset button the same way?
I tried the OEMTrigger/HotKey but that doesn't work since I need to read this from the state of the EStop Bit.
My control voltage circuit is set up so that releasing the estop switch does not turn the voltage on.
Control voltage is activated with separate button so I think it is possible/safe to do this if possible.
Turned out a long post but I hope you can bare with me...
Rgds,
Tapio
|